/*! 
 * Interface file for a game object.
 *
 * \author Devis Rossini
 * \date 23 April 2012
 */
#ifndef GAMEOBJECT_H_INCLUDE_GUARD
#define GAMEOBJECT_H_INCLUDE_GUARD

#include <Ogre.h>
#include <PhxEngine.h>

#include <PhxOgreUtils.h>

namespace GameObjects
{
	/*!
	 * Game object's interface.
	 */
	class GameObject
	{
	public:

		/*!
         * Constructor.
         */
		GameObject() { };

		/*!
         * Destructor.
         */
		virtual ~GameObject() { }

		/*!
         * Return a pointer to the physical entity associated to the object.
         */
		inline phx::CollisionPrimitive* GetPhxEntity()
		{
			return mPhxEntity;
		}

		/*!
         * Return a pointer to the rigid body associated to the object.
         */
		inline phx::RigidBody* GetRigidBody()
		{
			return mPhxEntity->GetBody();
		}

		/*!
         * Return a pointer to the scene node associated to the object.
         */
		inline Ogre::SceneNode* GetSceneNode()
		{
			return mSceneNode;
		}

		/*!
         * Update the object.
         */
		virtual void Update(const float iDuration) = 0;

	protected:

		/*!
		 * Physical object.
		 */
		phx::CollisionPrimitive* mPhxEntity;

		/*! 
		 * Ogre's scene node associated to the object.
		 */
		Ogre::SceneNode* mSceneNode;
	};
}

#endif // GAMEOBJECT_H_INCLUDE_GUARD